$(function() {
    DraggableEvent();

});
function DraggableEvent()
{
    $('#external-events div.external-event').each(function() {
//            var eventObject = {
//                id: $.trim($(this).attr('id')),
//                className: $.trim($(this).attr('tipo'))
//            };
        // store the Event Object in the DOM element so we can get to it later
//            $(this).data('eventObject', eventObject);
        // make the event draggable using jQuery UI
        var eventObject = {
            title: $.trim($(this).text()) // use the element's text as the event title
        };
        console.log("ss",eventObject);

        // store the Event Object in the DOM element so we can get to it later
        $(this).data('eventObject', eventObject);
        
        $(this).draggable({
            cursorAt: {bottom: 0},
            cursor: "move",
            helper: "clone",
            zIndex: 0,
            revert: true, // will cause the event to go back to its
            revertDuration: 0
        });
    });
}